<html>
<head><meta charset="utf-8"><title>Adding API for OpenSearch · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html">Adding API for OpenSearch</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227629160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227629160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227629160">(Feb 24 2021 at 16:37)</a>:</h4>
<p>Hi!<br>
It would be really useful if <code>doc.rust-lang.org</code> had some kind of API that returned OpenSearch-compatible <code>application/x-suggestions+json</code>.  Such a change would allow autocomplete suggestions when you activate that search engine in a browser URL bar.<br>
What would the work involved with such a change look like?  Is this something I could help with working on?</p>



<a name="227630859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227630859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227630859">(Feb 24 2021 at 16:46)</a>:</h4>
<p>This was discussed a little <a href="https://discord.com/channels/273534239310479360/273539705595756544/814169532453224458">on Discord</a>. Some points that were brought up:</p>
<ul>
<li>Search is run client-side, which makes all of this harder.</li>
<li>Opensearch is XML, not JSON, so I don't think it's feasible to store the search index in that format natively; I don't want an XML parser in JS, that sounds like a nightmare.</li>
<li>In theory it should be possible to do this client-side through a service worker (<a href="https://stackoverflow.com/questions/36535642/serving-an-opensearch-application-x-suggestionsjson-through-a-service-worker">https://stackoverflow.com/questions/36535642/serving-an-opensearch-application-x-suggestionsjson-through-a-service-worker</a>), but I don't know how useful that actually is. I think if we solve this for <a href="http://doc.rust-lang.org">doc.rust-lang.org</a> and <a href="http://docs.rs">docs.rs</a> only, that's probably fine.</li>
<li><span class="user-mention" data-user-id="210267">@Nemo157</span> suggested doing this on doc.RLO using a lambda that parses search-index.json itself. <a href="http://docs.rs">docs.rs</a> could do something similar server-side.</li>
</ul>
<p>I'd like to hear more about your use case - what do you want this for?</p>



<a name="227633193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227633193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227633193">(Feb 24 2021 at 16:59)</a>:</h4>
<p>I make fairly heavy use of Firefox's domain-specific search engines, and I imagine many others do as well.<br>
Integrating with the browser suggestion feature would be very convenient in allowing previews of crate names and functions before the search is completed.<br>
As for the XML point: I haven't looked into this much, but I believe this is just the manifest which provides the "Add Search Engine" menu option.  I believe it would be fairly straightforward to host this statically.<br>
The main interesting bit as I see it is the API that would be called to populate the suggestions.</p>



<a name="227633810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227633810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227633810">(Feb 24 2021 at 17:02)</a>:</h4>
<p><span class="user-mention" data-user-id="392305">@CodeSpelunker</span> if you want to search in Rust docs from your url bar you have these options:<br>
1) the rust firefox add-on: <a href="https://addons.mozilla.org/de/firefox/addon/rust-search-extension">https://addons.mozilla.org/de/firefox/addon/rust-search-extension</a><br>
2) <code>!bang</code> syntax from duckduckgo : <code>!rustdoc Option</code><br>
3) roll your own search OpenDocument XML: <a href="https://apiraino.github.io/firefox-custom-search">https://apiraino.github.io/firefox-custom-search</a> :-)</p>



<a name="227634263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634263">(Feb 24 2021 at 17:04)</a>:</h4>
<p>if it's as simple as hosting the static manifest, that seems fine to me</p>



<a name="227634484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634484">(Feb 24 2021 at 17:06)</a>:</h4>
<p>yeah, it's a simple  XML file and then add it to a <code>&lt;link....</code> in the headers of the website</p>



<a name="227634525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634525">(Feb 24 2021 at 17:06)</a>:</h4>
<p><span class="user-mention" data-user-id="250987">@apiraino</span> want to make a PR for that? <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>



<a name="227634532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634532">(Feb 24 2021 at 17:06)</a>:</h4>
<p>I can open a PR it you want</p>



<a name="227634545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634545">(Feb 24 2021 at 17:06)</a>:</h4>
<p>oh right you got me :D</p>



<a name="227634944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227634944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227634944">(Feb 24 2021 at 17:09)</a>:</h4>
<p><span class="user-mention" data-user-id="250987">@apiraino</span>, this looks very useful, and might even obviate what I'm talking about.<br>
<span class="user-mention" data-user-id="232545">@Joshua Nelson</span>, I believe the XML defines a few things, which FF/Chrome parses to register the search engine.  Among that metadata is the search engine name, the standard search API (like when you just press Enter or select a suggestion), and the suggestions API returning <code>application/x-suggestions+json</code>.</p>



<a name="227635019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227635019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227635019">(Feb 24 2021 at 17:09)</a>:</h4>
<blockquote>
<p>and the suggestions API returning application/x-suggestions+json.</p>
</blockquote>
<p>How would that work for a static server?</p>



<a name="227635388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227635388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227635388">(Feb 24 2021 at 17:11)</a>:</h4>
<p>That's what I'm not so sure about.<br>
I'd also like to look a little more closely at how the extension <span class="user-mention" data-user-id="250987">@apiraino</span> had linked works.  It might be doing something differently than the other search engines I've seen.</p>



<a name="227635628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227635628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227635628">(Feb 24 2021 at 17:12)</a>:</h4>
<p>I don't know enough about service workers and lambda to give you a good answer on how that would be implemented in this case</p>



<a name="227636899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227636899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227636899">(Feb 24 2021 at 17:20)</a>:</h4>
<p>If anyone else is interesting in looking through that extension's source code: <a href="https://github.com/huhu/rust-search-extension">https://github.com/huhu/rust-search-extension</a></p>



<a name="227640180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227640180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CodeSpelunker <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227640180">(Feb 24 2021 at 17:38)</a>:</h4>
<p><span class="user-mention" data-user-id="250987">@apiraino</span>  This extension won't work for me.<br>
There is no way to customize the prefix shortcut through the Settings interface, and the suggestions get mangled with my default search engine (Google) settings.  Underneath the extension results, I also get Google autocomplete results for <code>rs std::vec</code>.<br>
So, back to square one here.</p>



<a name="227649519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227649519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227649519">(Feb 24 2021 at 18:37)</a>:</h4>
<p>To be noted, it has to be done on <code>doc.rust-lang.org</code> side and not in rustdoc</p>



<a name="227649652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227649652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227649652">(Feb 24 2021 at 18:38)</a>:</h4>
<p>and I don't know how it works there...</p>



<a name="227671602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227671602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227671602">(Feb 24 2021 at 20:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="392305">CodeSpelunker</span> <a href="#narrow/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch/near/227640180">said</a>:</p>
<blockquote>
<p>the suggestions get mangled with my default search engine (Google) settings.  Underneath the extension results, I also get Google autocomplete results for <code>rs std::vec</code>.</p>
</blockquote>
<p><span class="user-mention" data-user-id="392305">@CodeSpelunker</span> what a drag. But thanks for reporting on that</p>



<a name="227672182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227672182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227672182">(Feb 24 2021 at 21:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> <a href="#narrow/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch/near/227649519">said</a>:</p>
<blockquote>
<p>To be noted, it has to be done on <code>doc.rust-lang.org</code> side and not in rustdoc</p>
</blockquote>
<p>didnt look yet at the codebase , you mean the patch should be pushed <a href="https://github.com/rust-lang/rust/tree/a143517d44cac50b20cbd3a0b579addab40dd399/src/librustdoc/html">here</a> or <em>not</em> here?</p>



<a name="227672451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227672451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227672451">(Feb 24 2021 at 21:04)</a>:</h4>
<p>not there</p>



<a name="227672575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227672575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227672575">(Feb 24 2021 at 21:05)</a>:</h4>
<p>I see. I thought this file <a href="https://github.com/rust-lang/rust/blob/0248c6f178ab3a4d2ec702b7d418ff8375ab0515/src/librustdoc/html/layout.rs#L56">here</a>  really had the header I was looking for</p>



<a name="227672763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227672763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227672763">(Feb 24 2021 at 21:06)</a>:</h4>
<p>I'm unclear what you're looking for.</p>



<a name="227672778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227672778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227672778">(Feb 24 2021 at 21:06)</a>:</h4>
<p>I don't know how this can work as a static file.</p>



<a name="227673314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673314">(Feb 24 2021 at 21:10)</a>:</h4>
<p>hmm ok I'll check later a bit the code and be back with a bit more context. I'm thinking two things that may be both wrong:<br>
1) <code>doc.rust-lang.org</code> is an artifact of compiling librustdoc (that html directory)<br>
2) when I compile my crate I use the same static HTML+css assets as <a href="http://doc.rust-lang.org">doc.rust-lang.org</a></p>



<a name="227673485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673485">(Feb 24 2021 at 21:11)</a>:</h4>
<p>yes, that's all right, but I don't know how you can do opensearch with static files</p>



<a name="227673495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673495">(Feb 24 2021 at 21:11)</a>:</h4>
<p>oh wait you were asking specifically about the header</p>



<a name="227673551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673551">(Feb 24 2021 at 21:12)</a>:</h4>
<p>sorry, that's the right place for the header</p>



<a name="227673706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673706">(Feb 24 2021 at 21:13)</a>:</h4>
<p>and then add another static asset (the XML file)</p>



<a name="227673768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227673768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227673768">(Feb 24 2021 at 21:14)</a>:</h4>
<p>that would probably be in <code>html/static</code></p>



<a name="227674504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227674504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227674504">(Feb 24 2021 at 21:18)</a>:</h4>
<p>I guess I'll see in the PR, but I don't think adding yet another file for such a specific feature is worth it for rustdoc</p>



<a name="227674642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227674642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227674642">(Feb 24 2021 at 21:19)</a>:</h4>
<p>But if the file is always the same and is rather small, then I guess it's fine, even though I think it's too much</p>



<a name="227679693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227679693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227679693">(Feb 24 2021 at 21:55)</a>:</h4>
<p><span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> for this feature to work it is mandatory to have a 10-ish lines XML similar to what <a href="http://docs.rs">docs.rs</a> already has<br>
<a href="https://docs.rs/-/static/opensearch.xml">https://docs.rs/-/static/opensearch.xml</a><br>
and add a <code>&lt;link...</code> header to the HTML<br>
No way around this (afaik). I perfectly understand you want to avoid bloat so it will be fine if you don't want to merge <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="227684501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227684501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227684501">(Feb 24 2021 at 22:19)</a>:</h4>
<p>So just like I said: it seems better to put it into <a href="http://doc.rust-lang.org">doc.rust-lang.org</a> instead</p>



<a name="227684576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Adding%20API%20for%20OpenSearch/near/227684576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Adding.20API.20for.20OpenSearch.html#227684576">(Feb 24 2021 at 22:20)</a>:</h4>
<p>I don't see why users generating doc locally should care about that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>